package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StorePriceSyncMapper;
import com.ruoyi.system.domain.StorePriceSync;
import com.ruoyi.system.service.IStorePriceSyncService;

/**
 * 门店售价同步记录 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-24
 */
@Service
public class StorePriceSyncServiceImpl implements IStorePriceSyncService
{
    @Autowired
    private StorePriceSyncMapper storePriceSyncMapper;

    /**
     * 通过id查询门店售价同步记录
     *
     * @param id 门店售价同步记录主键
     * @return 门店售价同步记录
     */
    @Override
    public StorePriceSync selectStorePriceSyncById(Long id)
    {
        return storePriceSyncMapper.selectStorePriceSyncById(id);
    }

    /**
     * 查询门店售价同步记录列表
     *
     * @param storePriceSync 门店售价同步记录
     * @return 门店售价同步记录
     */
    @Override
    public List<StorePriceSync> selectStorePriceSyncList(StorePriceSync storePriceSync)
    {
        return storePriceSyncMapper.selectStorePriceSyncList(storePriceSync);
    }

    /**
     * 新增门店售价同步记录
     *
     * @param storePriceSync 门店售价同步记录
     * @return 结果
     */
    @Override
    public int insertStorePriceSync(StorePriceSync storePriceSync)
    {
        return storePriceSyncMapper.insertStorePriceSync(storePriceSync);
    }

    /**
     * 修改门店售价同步记录
     *
     * @param storePriceSync 门店售价同步记录
     * @return 结果
     */
    @Override
    public int updateStorePriceSync(StorePriceSync storePriceSync)
    {
        storePriceSync.setUpdateTime(DateUtils.getNowDate());
        return storePriceSyncMapper.updateStorePriceSync(storePriceSync);
    }

    /**
     * 通过id批量删除门店售价同步记录信息
     *
     * @param ids 需要删除的门店售价同步记录主键
     * @return 结果
     */
    @Override
    public int deleteStorePriceSyncByIds(Long[] ids)
    {
        return storePriceSyncMapper.deleteStorePriceSyncByIds(ids);
    }

    /**
     * 通过id删除门店售价同步记录信息
     *
     * @param id 门店售价同步记录主键
     * @return 结果
     */
    @Override
    public int deleteStorePriceSyncById(Long id)
    {
        return storePriceSyncMapper.deleteStorePriceSyncById(id);
    }
}
